package com.easpeed.elevator.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.Objects;

/**
 * Created by bigyu on 2024/10/17 20:25
 * com.easpeed.elevator.bean
 */
public class OpticalBean implements Parcelable {

    private String parentId;
    private String parentName;

    public OpticalBean(String id) {
        this.id = id;
    }
    public OpticalBean() {
    }


    private String id;
    private String name;
    private String level;
    private String zjd;
    private String number;
    private String codeMark;
    private String length;
    private String remark;
    private int sortNum;


    private boolean expand;

    public boolean isExpand() {
        return expand;
    }

    public void setExpand(boolean expand) {
        this.expand = expand;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OpticalBean that = (OpticalBean) o;
        return Objects.equals(name, that.name);
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(name);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    protected OpticalBean(Parcel in) {
        id = in.readString();
        name = in.readString();
        level = in.readString();
        zjd = in.readString();
        number = in.readString();
        codeMark = in.readString();
        length = in.readString();
        remark = in.readString();
        sortNum = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(name);
        dest.writeString(level);
        dest.writeString(zjd);
        dest.writeString(number);
        dest.writeString(codeMark);
        dest.writeString(length);
        dest.writeString(remark);
        dest.writeInt(sortNum);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<OpticalBean> CREATOR = new Creator<OpticalBean>() {
        @Override
        public OpticalBean createFromParcel(Parcel in) {
            return new OpticalBean(in);
        }

        @Override
        public OpticalBean[] newArray(int size) {
            return new OpticalBean[size];
        }
    };

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getZjd() {
        return zjd;
    }

    public void setZjd(String zjd) {
        this.zjd = zjd;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getCodeMark() {
        return codeMark;
    }

    public void setCodeMark(String codeMark) {
        this.codeMark = codeMark;
    }

    public String getLength() {
        return length;
    }

    public void setLength(String length) {
        this.length = length;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getSortNum() {
        return sortNum;
    }

    public void setSortNum(int sortNum) {
        this.sortNum = sortNum;
    }

}
